Conventional inverter-integrated motors have been constituted by: a motor that includes: a stator; a rotor; a motor case that holds the stator in an internally fitted state; and a front frame end and a rear frame end that are disposed at two axial ends of the motor case, and that rotatably support the rotor; and a control unit that is constituted by: a power portion through which a driving current that drives the motor is passed; and a control portion that controls driving of the motor. The control unit has been configured by screwing to a heatsink using screws a controlling circuit board to which parts such as a microcomputer that constitutes part of the control portion are mounted, a power board to which parts such as capacitors that constitute part of the power portion are mounted, power modules, a connector, etc. The control unit has been attached so as to be integrated with the motor by attaching the heatsink to the rear frame end using screws, and the cover member has been mounted so as to accommodate the control unit (see Patent Literature 1, for example).